<%-- 
  - Author: Mohtisham Anwar
  - Date: 23-Mar-2011
  - Copyright Notice: TRAKHEES
  - Description: form.jsp
 --%>

<%@ include file="/WEB-INF/view/include.jsp"%>
<%@ page import="ae.pcfc.etks.online.web.*"%>
<!--<link
	href='<c:url value="/resources/styles/redmond/jquery-ui-1.8.10.custom.css"/>'
	rel="stylesheet" type="text/css" />
<link
	href='<c:url value="/resources/styles/validation/validationEngine.jquery.css"/>'
	rel="stylesheet" type="text/css" />
<link href='<c:url value="/resources/styles/validation/template.css"/>'
	rel="stylesheet" type="text/css" />
<link
	href='<c:url value="/resources/styles/validation/jquery.validity.css"/>'
	rel="stylesheet" type="text/css" />


<script language="Javascript"
	src='<c:url value="/resources/js/ui/jquery-ui-1.8.10.custom.min.js"/>'></script>
<script language="Javascript" charset="utf-8"
	src='<c:url value="/resources/js/validation/jquery.validate.min.js"/>'></script>
<script language="Javascript"
	src='<c:url value="/resources/js/validation/localization"/>/<spring:message code="page.js.validation"/>'></script>


<script language="Javascript" charset="utf-8" type="text/javascript"
	src='<c:url value="/resources/js/jquery.alerts.js"/>'></script>
<link rel=stylesheet type=text/css
	href='<c:url value="/resources/styles"/>/jquery.alerts.css' />
	

<link rel=stylesheet type=text/css
	href='<c:url value="resources/styles"/>/jquery.qtip.css' />	

<script language="Javascript" charset="utf-8"
	src='<c:url value="resources/js/ui/jquery.qtip.js"/>'></script>

--><script type="text/javascript">
	$().ready(function() {

		//$( "input:submit" ).button();

		$("#ClientRegister").validate({
			onfocusout:false,
			onkeyup:false,
			onclick: false,			
			rules : {
				strTrakheesPIN : "required",
				strTrakheesID : "required"
				
			},
			showErrors : function(errorMap, errorList) {

				var errors = '<ul>';
				var label;
				if (errorList.length) {
					$.each(errorMap, function(name, value) {
						label = $("label[for='" + name + "']").html();
						label = value + '[' + label + ']';
						errors = errors + '<li>' + label + '</li>';

					});
					errors = errors + '</ul>';
					jAlert('error', errors, '<spring:message code="label.errormessage" />');
				}
			}
		});
		
		$(function() {



			$('.tooltip').qtip({			
			   title: {
		     	   text: '',
				   	button: true

			      },
			   style: {
			      tip: {
			         corner: true        
					},
					classes: 'ui-tooltip-shadow ui-tooltip-blue'
			   }
			});

		}); 

	});
</script>

<div id="container" dir='<spring:message code="page.dir"/>'  align='<spring:message code="page.align"/>' class="t_fin-black-txt">

<form:form name="ClientRegister" id="ClientRegister" method="POST"	modelAttribute="<%=ConstantsAdmin.REGISTER_MODEL_KEY%>">
	
	
		<spring:hasBindErrors
			name="<%=ConstantsAdmin.REGISTER_MODEL_KEY %>">
			<script type="text/javascript">
				$(document)
						.ready(
								function() {
									jAlert(
											'error',
											'<li><form:errors path="*" delimiter="<li>"/>',
											'<spring:message code="label.errormessage" />');
								});
			</script>
		</spring:hasBindErrors>
				
			
		<fieldset>
			<legend><spring:message code="label.client.registerdUser" /></legend>
		</fieldset>				
		
		<div class="t_form-left">
				<div class="fm-req">
				    <form:label path="strTrakheesID">
				    <span class="t_star">*</span>
					<spring:message code="label.client.trakheesID" />
					</form:label>
					<form:input path="strTrakheesID" id="strTrakheesID" size="20"
						maxlength="50" />
				</div>
			  
				
			  
				<div class="fm-req">
				    <form:label path="strTrakheesPIN">
				    <span class="t_star">*</span>
					<spring:message code="label.client.trakheesPIN" />
					</form:label>
					<form:password path="strTrakheesPIN" id="strTrakheesPIN"
						size="20" maxlength="50" />
			    </div>  
		</div>				
			<div id="fm-submit" class="fm-req">
					<input type="submit"
						value="<spring:message code="label.button.submit" />" class="t_btns submit"/>
			</div>
		<br>
				<div class="t_form-left">
					<div class="fm-req"><spring:message code="label.new.user" /></div>
				
				
                     <div class="fm-req">
						<a href="nonclient/company/register/form.htm"><spring:message code="label.register.company" /></a><img class="tooltip" src='<c:url value="resources/images/question.png"/>' title="<spring:message code="title.non.client.company.register" />"><br>
						<a href="nonclient/person/register/form.htm"><spring:message code="label.register.person" /></a><img class="tooltip" src='<c:url value="resources/images/question.png"/>' title="<spring:message code="title.non.client.person.register" />"><br>
						

                    </div>
                  </div>
</form:form>
</div>
